#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTcpServer>
#include <QTcpSocket>
#include <QNetworkInterface>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private:
    Ui::Widget *ui;
    QTcpServer *tcpServer;


private slots://槽函数
    void mNewConnetion();

    void receiveMessages();

    void mStateChanged(QAbstractSocket::SocketState);

    void on_sendMessages_clicked();
    void on_startMonitor_clicked();
    void on_stopMonitor_clicked();
};
#endif // WIDGET_H
